<?php 
$data = array(
            'items'=>array(
                        'firstname'=>'Maodo',
                        'lastname'=>'DIOP',
                        'address'=>'Bargny,Dakar,Senegal'
                        )
            );

            echo json_encode($data);
?>
<script>
function getData()
{
    new Ajax.Request(

        "http://192.168.1.12/zftutoriel/public/abonne/jsontest.php", 
            {
                method:'post',
                onSuccess: processData
        }
    );
}
function processData(rsp)
{
var response = eval('(' + rsp.responseText + ')');
var firstname = response.items(0).firstname;
var lastname = response.items(0).lastname;
var address  = response.items(0).address;
}
</script>
<a href="#" onclick="getData();">Json Data</a>